package com.nju.edu.erp.service.promotion;

import com.nju.edu.erp.dao.PromotionDao;
import com.nju.edu.erp.model.po.promotion.PromotionThreePO;
import com.nju.edu.erp.model.vo.promotion.PromotionVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;

public class SetPromotionThree implements SetPromotion{
    private PromotionDao promotionDao;
    private PromotionVO promotionVO;
    @Autowired
    public SetPromotionThree(PromotionDao promotionDao, PromotionVO promotionVO){
        this.promotionDao=promotionDao;
        this.promotionVO=promotionVO;
    }
    @Override
    public void setPromotion(PromotionVO promotionVO) {
        PromotionThreePO promotionThreePO=new PromotionThreePO();
        BeanUtils.copyProperties(promotionVO,promotionThreePO);
        promotionDao.setPromotionThree(promotionThreePO);
    }
}
